<?php
/*
 * @Author: 白酒煮饭
 * @Date: 2018-10-31 14:57:46
 * @lastEditors: 白酒煮饭
 * @LastEditTime: 2019-06-13 20:10:18
 */
$user = $_GET['user'];
$filename = $_GET['name'];
$file = "./AutoJs_Code/".$user."/".$filename;

if (file_exists($file)) {
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename="'.basename($file).'"');
    header('Expires: 0');
    header('Cache-Control: must-revalidate');
    header('Pragma: public');
    header('Content-Length: ' . filesize($file));
    readfile($file);
    exit;
}
?>